from bs4 import BeautifulSoup
myHtml="""<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>This is my Title</title>
</head>
<body>
<h1>this is h1</h1>
<h1>这是另外一个</h1>
<h2>this is h2</h2>
<p>this is inty</p>

</body>
</html>"""
soup=BeautifulSoup(myHtml,'html.parser')
myH1=soup.findAll('h1')
for i in myH1:
    if '这是' in i.string:
        print(i.string)
